
const changeMenu = (e) => {
  var aa = []
  var busB = {}
  var busC = []
  var busD = []
  e.children.map((val) => {
    busB.label = val.name
    busB.key = val.menuId
    busB.value = val.menuId
    busB.children = []
    if (val.children) {
      val.children.map((value) => {
        busC.label = value.name
        busC.key = value.menuId
        busC.value = value.menuId
        busB.children.push(busC)
        busC = {}
      })
    } else {
      delete busB.children
    }
    busD.push(busB)
    busB = {}
  })
  var busAA = []
  busAA.label = e.name
  busAA.key = e.menuId
  busAA.value = e.menuId
  busAA.children = busD
  aa.push(busAA)
  return aa
}
export default changeMenu